package com.zx.flow.api.execute.model;

import com.zx.flow.api.dict.FlowDict.OperatorRule;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema.AccessMode;
import jakarta.validation.constraints.NotEmpty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Schema(title = "流程操作人", description = "流程操作人")
public class FlowOperator {

    @Schema(description = "操作人账号", example = "zhangsan")
    @NotEmpty(message = "操作人账号不能为空")
    private String accountCode;

    @Schema(description = "操作人姓名", example = "张三")
    @NotEmpty(message = "操作人名字不能为空")
    private String accountName;

    /**
     * {@link OperatorRule}
     */
    @Schema(description = "操作人在当前节点中的角色", accessMode = AccessMode.READ_ONLY)
    private String rule = OperatorRule.operator.getCode();

}
